package com.lancoo.dictionary.nc;

import com.lancoo.dictionary.DictionaryHelper;

import org.xutils.common.Callback.Cancelable;
import org.xutils.common.Callback.CommonCallback;
import org.xutils.http.RequestParams;
import org.xutils.x;

public class NetworkConnectionByContent extends RequestParams {

	private Cancelable cancelable;

	public NetworkConnectionByContent(String knowledge, CommonCallback<String> callback) {
		super(DictionaryHelper.API_PATH);
		this.addBodyParameter("levelCode", "");
		this.addBodyParameter("UserID","");
		this.addBodyParameter("knowledge", knowledge);
//		this.addBodyParameter("SysID", "621");
		cancelable=x.http().get(this, callback);
	}
	public void cancelConnection(){
		if (cancelable!=null&&!cancelable.isCancelled()) {
			cancelable.cancel();
		}
	}
	
}
